package com.sky.controller.admin;


import com.sky.dto.SaveScriptPlayerCountsListDTO;
import com.sky.result.Result;
import com.sky.service.ScriptPlayerCountsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author majun
 * @package com.sky.controller.admin
 * @date 2025/6/21 14:00
 */
@RestController
@RequestMapping("/admin/scriptPlayerCounts")
@Slf4j
public class ScriptPlayerCountsController {

    @Autowired
    private ScriptPlayerCountsService scriptPlayerCountsService;

    /**
     * 保存和修改剧本人数列表
     * @param saveScriptPlayerCountsListDTO 剧本人数
     * @return 响应结果
     */
    @PostMapping("/saveScriptPlayerCountsList")
    private Result saveScriptPlayerCountsList(@RequestBody SaveScriptPlayerCountsListDTO saveScriptPlayerCountsListDTO) {

        log.info("保存剧本人数：{}", saveScriptPlayerCountsListDTO);

        scriptPlayerCountsService.saveScriptPlayerCountsList(saveScriptPlayerCountsListDTO);

        return Result.success();

    }

}
